package demo.rocketmq;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author zhangyunzhe
 * 同步顺序消费
 */
@RocketMQMessageListener(topic = "217-topic-order",consumerGroup = "217-topic-order",consumeMode = ConsumeMode.ORDERLY)
@Component("ConsumerService2")
public class ConsumerService2 implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("收到消息："+message);
    }
}
